1. Field of the Invention
The present invention relates to image encoding and/or decoding, and more particularly, to a residue image down- and/or up-sampling method and apparatus and an image encoding and/or decoding method and apparatus using the residue image down- and/or up-sampling method and apparatus.
2. Description of the Related Art
Generally, when a color image is encoded, color transform is first performed and then encoding is performed. That is, when a color image is encoded, the image is divided into a luminance component and a chrominance component and then encoding is performed. At this time, more information is concentrated on the luminance component, and the chrominance component has less information. Accordingly, in order to increase compression efficiency, the number of samples of the chrominance component is reduced and then encoded. At this time, as the sampling format, a 4:2:2 format and a 4:2:0 format are generally used. That is, in the conventional encoding method, an original image is divided into a luminance component and a chrominance component, then the chrominance component is sampled, and then, encoding is performed.
For example, in order to encode an RGB image, the RGB image is transformed into a YCbCr image, a luminance component and a chrominance component are separated, and then, encoding is performed. If thus encoding is performed, the encoding efficiency is enhanced, because there is much redundancy between respective chrominance components and the redundancy has been removed through the transform.
Meanwhile, during a transform and restoration process, loss occurs such that the picture quality of the image can be degraded. The thus transformed image goes through a chrominance sampling process in order to increase a compression efficiency. The reason for this process is, because information is concentrated on the luminance component through the color transform, the amount of information in the chrominance component is less, and because human vision is less sensitive to a color change, even when color information is reduced, it cannot be easily discerned through human vision. FIGS. 1B and 1C illustrate chrominance sampling methods with a 4:2:2 format and a 4:2:0 format, respectively, in YCbCr that is generally used. In FIGS. 1A through 1C, X represents a luminance Y component, while O represents chrominance components Cb and Cr. Here, O is represented by Cb and Cr components overlapping each other. That is, one O mark corresponds to a pair of Cb and Cr components. FIG. 1A shows a 4:4:4 format that is a state before sampling. FIG. 1B shows a 4:2:2 format and it can be seen that the chrominance component is reduced by half compared to the luminance component. At this time, it can be seen that two chrominance samples adjacent in the width direction are combined into one. The reason for combining samples in the width direction is that the redundancy in the width direction is generally greater than that in the length direction, and is also to easily support display in interlaced scanning. In FIG. 1C, 4 samples adjacent in the width and length directions are combined into one such that the chrominance component is reduced to one fourth of the luminance component. In order to sample a chrominance component, only immediately adjacent pixels can be considered, but in general, filtering is performed considering values of surrounding pixels together.
Meanwhile, when the thus transformed image is encoded, a process removing redundancy in each component through spatiotemporal prediction is performed and as a result, a residue image is obtained. In H.264/MPEG-4 pt. 10 AVC Standardization technology of Joint Video Team (JVT) of ISO/IEC MPEG and ITU-T VCEG (“Text of ISO/IEC FDIS 14496-10: Information Technology—Coding of audio-visual objects—Part 10: Advanced Video Coding”, ISO/IEC JTC 1/SC 29/WG 11, N5555, March, 2003), encoding efficiency is enhanced by performing spatial and temporal prediction encoding in a variety of ways.
FIG. 2 is a block diagram showing a general image encoding process. As described above, the color of an original image (In) is transformed by changing the color representation format through the color transform unit 200. Chrominance downsampling is performed in a chrominance downsampling unit 210, and then encoding process is performed through a spatiotemporal prediction unit 220, a transform/quantization unit 230, an entropy encoding unit 240, an inverse quantization/inverse transform unit 250, and a spatiotemporal prediction compensation unit 260.
FIG. 3 is a block diagram showing a general image decoding process. As described above, also when decoding is performed, a bitstream is entropy decoded in an entropy decoding unit 300, and inverse quantization and inverse transform are performed in an inverse quantization/inverse transform unit 310, and by doing so, decoding is performed. Then, the decoded image (F'n) undergoes chrominance upsampling and inverse color transform in a chrominance upsampling unit 330 and an inverse color transform unit 340 such that a restored image (I'n) is generated.
Among problems occurring in this sampling process, two can be pointed out in particular. One problem is that because sampling is performed immediately after color transform is performed, loss of information is great.
The other problem is that when color transform is not performed, the effect of sampling is reduced greatly. This is because information is redundantly present in each component before color transform is performed and if sampling is performed directly, loss occurs in each component to increase the total loss. Accordingly, generally, sampling is not performed directly but performed after color transform is performed. Also, the luminance component is not sampled and only the chrominance component is sampled and used.